<?
	$a_path=split("/",$PHP_SELF);
	$path_size=sizeof($a_path);
	switch ($path_size) {
		case 2 : $path=".";	break; 
		case 3 : $path=".."; if(!$sub_path){$sub_path=".";} break;
		case 4 : $path="../.."; if(!$sub_path){$sub_path="..";} break;
		case 5 : $path="../../.."; if(!$sub_path){$sub_path="../..";} break;
	}

	include "../include/common.inc.php";
	include "$path/include/conn_save.php";
//	include "$path/include/session_start.php";	
	include "../include/lib/rsv_function.php";
//	include "../include/db_connect.php";
	include "../jn_airsale/inc/config.php";
	include "../jn_rentcar/inc/config.php";
	include "../jn_lodging/inc/config.php";
	include "./inc/config.php";
	mysql_query("SET NAMES UTF8");
	
	$curr_time=$stime_zerohour;
	$ld_rsv_days=$night;
	$ld_room_data = jnld_getLdRoodData($pkg_ld_lr_no,$connect);

	$sql="select * from jn_ld_product where lp_cod='".$ld_room_data["lrlp_cod"]."'";
	$query=mysql_query($sql);
	$arr=mysql_fetch_array($query);

	//$ld_room_price_arr = jnld_getLdPrice($lp_cod,$arr["lp_wendprice_info"],$room_arr[$room_tmpnum]["lr_no"],$curr_time,$connect);
	if($ld_rsv_days>1)
	{
		for($dayNum=0; $dayNum<$ld_rsv_days; $dayNum++)
		{
			$ld_room_price_arr = jnld_getLdPrice($ld_room_data["lrlp_cod"],$arr["lp_wendprice_info"],$ld_room_data["lr_no"],($curr_time+(86400*$dayNum)),$connect);
			$ld_room_price_netprice += $ld_room_price_arr[0];
			$ld_room_price_saleprice += $ld_room_price_arr[1];
		}
	}
	else
	{
		$ld_room_price_arr = jnld_getLdPrice($ld_room_data["lrlp_cod"],$arr["lp_wendprice_info"],$ld_room_data["lr_no"],$curr_time,$connect);
		$ld_room_price_netprice = $ld_room_price_arr[0];
		$ld_room_price_saleprice = $ld_room_price_arr[1];
	}

	$ld_room_equip_arr = explode("|",$ld_room_data["lr_equip"]);
?>

		<h2>숙소상세설명</h2>
		<div class="info_list02">
			<div class="pic">
<?
	$img_sql="select lii_img_file  from jn_ld_inimage where liilr_no='".$ld_room_data["lr_no"]."' order by lii_mtime desc limit 3";
	$img_query=mysql_query($img_sql);
	$img_tmp=1;
	while($img_arr=mysql_fetch_array($img_query))
	{
		if($img_arr["lii_img_file"]) {
			$src_str="/jn_lodging/upload/in/".$img_arr["lii_img_file"]."";
		} else {
			$src_str="/image/noimg.gif";
		}
		if($img_tmp==1) { ?>
			<div class="pic_wrap"><a href=""><img id='jnld_subTitimg<?=$room_tmpnum?>' src='<?=$src_str?>' width="254" height="190" alt="이미지"></a></div>
			<ul class="s_pic">
<?	} ?>
				<li <?=($img_tmp == 3)?"class='end'":""?>><a href=""><img width="80" height="56" alt="테스트" src="<?=$src_str?>" onMouseOver="jnld_swapInImg('<?=$room_tmpnum?>','<?=$img_arr["lii_img_file"]?>')"></a></li>
<?
		$img_tmp++;
	}
?>
			</ul>
			</div>
			<div class="data_info">
				<h3><?=iconv( "EUC-KR","UTF-8", $ld_room_data["lr_name"])?></h3>
				<ul>
					<li>
						<span class="item"> 기준인원</span>
						<span class="value"><?=$ld_room_data["lr_basic_cnt"]?>인기준, 최대<?=$ld_room_data["lr_max_cnt"]?>인 </span>
					 </li>
					<li>
						<span class="item"> 객실요금</span>
						<span class="value">1일 1인 추가요금<br />성인:<?=number_format($ld_room_data["lr_adultadd_price"])?>원 / 소아:<?=number_format($ld_room_data["lr_childadd_price"])?></span>
					 </li>
					<li>
						<span class="item"> 객실소개</span>
						<span class="value"><?=iconv( "EUC-KR","UTF-8",$ld_room_data["lr_etc_info"])?></span>
					 </li>
					<li>
						<span class="item"> 객실비품</span>
						<span class="value">
						<?
								$equip = array("","취사시설","에어컨","TV","냉장고","티테이블","스카이라이프","헤어드라이","컴퓨터","테라스","쇼파","세탁기","전자렌지","침대");
							
								for($i=0; $i<count($ld_room_equip_arr); $i++)
								{ 
									//if(($i%6==0)&&$i>0) echo("<br>");
									if($ld_room_equip_arr[$i]) echo $equip[$ld_room_equip_arr[$i]];
									if(	$i < (count($ld_room_equip_arr)-2)) echo ", ";
									//echo("<img src='/jn_lodging/img/equip/view_icon".$ld_room_equip_arr[$i].".gif' vspace='2' hspace='5'>");
									
								}							
						?>
						</span>
					 </li>
				</ul>
			</div>		
		</div>
		<div class="plot">
			<h3 class="gray">이용안내</h3>
<?
		if($arr["lp_intro_html"]=='Y') $lp_intro = $arr["lp_intro"];
		else  $lp_intro = nl2br($arr["lp_intro"]);
		echo $lp_intro;
?>
		</div>
<script>
all_frmChk();
</script>